package com.lmk.homework.w02;

import java.util.Scanner;

public class PayrollSystem {
    public static void main(String[] args) {
     Employee[] arr=new Employee[10];

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
            System.out.println(arr[i].earning());
        }

        System.out.println("------------");
        System.out.println("请输入本月月份");
        Scanner input = new Scanner(System.in);
        int month = input.nextInt();

        for (int i = 0; i < arr.length; i++) {
            if(arr[i].getBirthday().getMonth() == month) {//判断本月有没有人生日
                System.out.println(arr[i]);
                System.out.println("实际工资：" + (arr[i].earning() + 100));
            }else {
                System.out.println(arr[i]);
                System.out.println("实际工资：" + arr[i].earning());
            }


    }
}}
